from typing import Annotated

from fastapi import APIRouter, Depends

from dc_shop.database.services import BotSettingsService
from dc_shop.webapp.app.providers.stub import Stub

bot_status_router = APIRouter(prefix="/bot_status", tags=["bot_status"])


@bot_status_router.get("/")
async def get_bot_status(
    bot_settings_service: Annotated[BotSettingsService, Depends(Stub(BotSettingsService))],
):
    bot_settings = await bot_settings_service.get_bot_settings()

    return bot_settings.is_bot_enabled, bot_settings.bot_disabled_until
